package com.ggjp.ribbon.order;

import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author quick
 */
@RestController
public class OrderService {

    @Value("${server.port}")
    private String port;

    @GetMapping("/orders")
    public JSONObject getOrderInfo() {
        System.out.println("port = " + port);
        String s = "{id:" + 1 + ",price:" + "20" + "}";
        return JSONUtil.parseObj(s);
    }
}
